import Util from '@/common/util';

import { Cron } from './cron';

export default class Thing {
  private id: string = '';

  title: string = '';
  comment?: string;
  done: boolean = false;
  cron?: Cron;
  createdAt: number = 0;

  getID(): string {
    return this.id;
  }

  constructor(title: string, cron?: Cron) {
    this.id = Util.guid();
    this.title = title;
    this.cron = cron;
    this.createdAt = new Date().getTime();
  }
}
